package ink.carnation.imtalk.model.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;

/**
 * @author: flbu920
 * @date 2020/9/23
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserRegisterDTO {

    @Email(message = "Email格式非法")
    @NotNull(message = "邮箱为空")
    private String email;

    @NotNull(message = "用户名为空")
    private String nickname;

    @NotNull(message = "验证码不为空")
    private String validCode;

    @NotNull(message = "密码为空")
    @Length(min = 3, max = 16, message = "密码长度必须为3到16个字符")
    private String password;
}
